bitkeeper revision 1.1159.79.5 (414eb5ccBh7RW8Eo9mCc8WaCqLx0Kg)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Mon, 20 Sep 2004 10:49:48 +0000 (10:49 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Mon, 20 Sep 2004 10:49:48 +0000 (10:49 +0000)
Ensure we get output from C extensions via stdout/stderr, by disabling
default stream buffering.

tools/python/xen/lowlevel/xc/xc.c
tools/python/xen/lowlevel/xu/xu.c

index 840a954e94a03936f7afcaf221c93bb44b287bde..9d73b04114e17596a225a3364a20ffff91995b78 100644 (file)
@@ -1320,4 +1320,8 @@ PyMODINIT_FUNC initxc(void)
     PyDict_SetItemString(d, "error", xc_error);
 
     zero = PyInt_FromLong(0);
+
+    /* KAF: This ensures that we get debug output in a timely manner. */
+    setbuf(stdout, NULL);
+    setbuf(stderr, NULL);
 }
index f31d54b527ddc618f874e046d63cc1226365dd2f..7bf82e483a091d0992d4b478511cc60d3be5b80c 100644 (file)
@@ -1438,4 +1438,8 @@ PyMODINIT_FUNC initxu(void)
     d = PyModule_GetDict(m);
     port_error = PyErr_NewException(XENPKG ".PortError", NULL, NULL);
     PyDict_SetItemString(d, "PortError", port_error);
+
+    /* KAF: This ensures that we get debug output in a timely manner. */
+    setbuf(stdout, NULL);
+    setbuf(stderr, NULL);
 }